You can also create php scripts designed to run in the terminal like so:

?
1
	
# php -f php-file.php


1) Fire up a text editor and create your file, eg:

?
1
2
3
	
#!/usr/bin/php
// ^^ that line tells the command line that the file should be parsed by the php CLI interpreter
echo "Hello terminal\n"; 

2) Give the script execute permissions:

?
1
	
# chmod +x script.php

3) Execute your script:

# ./script.php
Hello terminal


This is all assuming you have the CLI version of PHP. FC installs this by default.
